package org.zsk.cs.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.zsk.cs.domain.po.Forum;
import org.zsk.cs.domain.vo.ForumVo;
import org.zsk.cs.domain.vo.ForumVo;

import java.util.List;

/**
 * <p>
 * 社区论坛 service
 * </p>
 *
 * @author zsk
 * @version 1.0
 * Created on 2020/03/26
 */
public interface ForumService extends IService<Forum> {

    /**
     * 村长开题论坛
     * @param forum 论坛
     */
    Boolean addByDistrictHead(Forum forum);

    /**
     * 居民参与开题论坛
     * @param forum 论坛
     */
    Boolean residentAccess(Forum forum);

    List<Forum> search(ForumVo forumVo) throws Exception;

    /**
     * @return 返回包含用户名的论坛list
     * @throws Exception
     */
    public Page<ForumVo> getWithUserNameByPage(ForumVo forumVo) throws Exception ;

    Page<ForumVo> districtHeadGetWithUserNameByPage(ForumVo forumVo) throws Exception;

    Page<ForumVo> residentGetWithUserNameByPage(ForumVo forumVo) throws Exception;

    boolean districtHeadSave(ForumVo forumVo) throws Exception;
}
